<%# locals: (f:, user:) %>

<%= errors_for user %>

<div class="required">
  <%= f.label :name, t(".name") %>
  <%= f.text_field :name %>
</div>

<% if Errbit::Config.user_has_username %>
  <div class="required">
    <%= f.label :username, t(".username") %>
    <%= f.text_field :username %>
  </div>
<% end %>

<div class="required">
  <%= f.label :email, t(".email") %>
  <%= f.text_field :email %>
</div>

<% if Errbit::Config.github_authentication %>
  <div>
    <%= f.label :github_login, "#{Errbit::Config.github_site_title} login" %>
    <%= f.text_field :github_login %>
  </div>
<% end %>

<div class="required">
  <%= f.label :per_page, t(".entries") %>
  <%= f.select :per_page, [10, 20, 30, 50, 75, 100] %>
</div>

<div class="required">
  <%= f.label :time_zone, t(".time_zone") %>
  <%= f.time_zone_select :time_zone, ActiveSupport::TimeZone.us_zones %>
</div>

<div class="required">
  <%= f.label :password, t(".password") %>
  <%= f.password_field :password, autocomplete: "off" %>
</div>

<div class="required">
  <%= f.label :password_confirmation, t(".password_confirmation") %>
  <%= f.password_field :password_confirmation %>
</div>

<% if current_user.admin? %>
  <div class="checkbox">
    <%= f.check_box :admin %>
    <%= f.label :admin, t(".admin") %>
  </div>
<% end %>
